package edu.xmut.kakamusic.adapter;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;

import java.util.List;

import edu.xmut.kakamusic.R;
import edu.xmut.kakamusic.bean.entity.Python;

public class PythonAdapter extends BaseQuickAdapter<Python, BaseViewHolder> {

    public PythonAdapter(@Nullable List<Python> data) {
        super(R.layout.item_python, data);
    }

    @Override
    protected void convert(@NonNull BaseViewHolder baseViewHolder, Python python) {
        baseViewHolder.setText(R.id.tv_python_address, python.getAddress());
        baseViewHolder.setText(R.id.tv_python_content, python.getContent());
        baseViewHolder.setText(R.id.tv_python_open_class, python.getOpenClass());
    }
}
